home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
ab20
/
ab20_archive
/
languages
/
c++
/
gccg++1.40-920127.lha
/
README
Wrap
Text File
|
1992-01-27
|
6KB
|
115 lines
Oh well.. I thought this wasn't necessary. But since gcc2.0 is somewhat
late, and since I got many requests for a C++ compiler *now*, I compiled
version 1.40 of both, gcc and g++. They're included in this archive.
Since my C library is out now, and since archives are getting bigger and
bigger, I decided not to include any headers and libraries with the
compiler distribution anymore (except the minimal gnulib, which is needed
for g++). All binaries need the shared library though, which is included.
If you didn't already, I strongly advise you to obtain the library from
the same site you got this archive (or from amiga.physik.unizh.ch or
nic.funet.fi if that fails). You can use almost any C library for gcc, but
you'll probably run into bigger problems using libg++ with a typical
Amiga C library, since libg++ uses some pretty private information from
the stdio implemention (which is the reason why I didn't upgrade my stdio
package to the newest BSD version, I'll first have to check compatibility
issues in libg++).
G++ introduces some other problem. Until now, you were more or less free
which linker you used (for BLink, you had to convert the object files with
SObjA, written by the BuRP team, for Manx, you could use my sun2manx tool),
now you probably HAVE to use gcc-ld, or you teach your conversion tool to
implement those GNU set objects, that implement initialization of file scope
variables (constructors/destructors in C++). Since sun2manx is a thing of
the past, at least I won't implement this there.
INSTALLATION
If you are upgrading from one of my previous releases, you should feel
familiar with the directory structure already (I didn't change to the
gcc-2.0 structure on purpose since this is still the old 1.x line). The
only minor thing that changed, is that the assembler is now called
`gcc-as', no longer `gcc-a68'. This makes this gcc port use the same names
used by gcc under **ix systems.
And don't forget: install ixemul.library into libs:! It's a newer version
than the one distributed with the library archive currently.
Note: I changed the normal name `g++' to `gpp', since if AmigaDOS sees a
line terminated with a `+', the `+' is swallowed and treated as
line continuation character (somewhat like \ under **ix).
The hunk2gcc/ directory contains a bugfixed version of hunk2gcc, see
its README file for further explanations.
If this is your first approach to gcc/g++, this is what you have to do
to make it work (hopefully ;-)):
o the directory local/ contains the preprocessor, C-compiler, C++-compiler,
assembler and linker. Assign LOCAL: to this directory.
o bin/ contains the drivers (gcc and gpp). Either copy those files into a
directory you have in your PATH or add bin/ to your PATH.
o lib/ contains `gnulib', which defines some symbols needed for g++
initialization stuff.
Assign GCC: to a directory, such that Gcc:include/ points to your header
files, and Gcc:lib/ contains this gnulib, your C-library (called libc.a),
and your C-startup file (called crt0.o).
If you don't have headers and a C library, you can get them from the
same site you got this archive from, or if that fails, from
amiga.physik.unizh.ch or nic.funet.fi. (The file should be called
ixemlib92xy.lha, where xy should be as high as possible).
o libs/ contains ixemul.library, my shared library that emulates lots of
**ix system calls, and additionally contains most functions which normally
are in a static C library for other compilers. You have to install this
library in your LIBS: directory, or none of the distributed binaries
will work !!
CHANGES SINCE 1.39
Besides the `normal' changes as documented in the ChangeLog of the source
distribution of gcc (obtainable from prep.ai.mit.edu:pub/gnu/gcc-1.40.tar.Z),
I made some changes to the tm-amiga.h file to better support the now (really?)
default setting of -mc68000 -msoft-float. It seems that this default isn't
supported properly for the Sun configuration either, that's the reason the
1.39 release had problems in this area. You find this file in the src/
directory. You should now be able to compile
gcc foo.c -o foo
and expect foo to be fully 68000 conformant, before you had to explicitly
use the `-mc68000 -msoft-float' options.
Since the new compiler uses the shared library, it profits from improvements
made there as well. I hope this won't introduce too many new bugs though...
One consequence of using the shared library though will probably be a slight
increase in memory use. I agree that memory usage starts to be inacceptable,
especially for g++. If someone comes up with a more restrictive malloc-package
(has to support the functions from the current implementation, especially
memalign()), I'll be happy to include it in the library as an option for
systems that don't come with megabytes of RAM. In some cases you might get
away with flushing the library from time to time.
SOME REMARKS TO G++
I don't know hardly any C++, so I'm not able to really test this compiler.
What I did, I compiled groff-1.04, and it seems to work reasonably well
(finally a man page formatter under AmigaDOS ;-)). You probably want libg++
as well, which I'll upload as a separate package (to cut down on the size
of this one, for those that only want gcc).
Then, since this the first real free C++ compiler for the Amiga, I'd like to
hear how well it competes against the commercial products, if you have some
benchmarks, please let me know!
Good luck!
-Markus Wild
X400-routed...: <wild@nessie.cs.id.ethz.ch>
SMTP-direct: <wild@amiga.physik.unizh.ch>